#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
GOLO_Ver='0.3'
. /opt/openresty/nginx/scripts/golo.conf
source  /opt/ros/melodic/setup.bash
roscd simple_nav_goals
sudo mv launch $GOLO_WS_PATH/../../
cd  $GOLO_WS_PATH/../..
mkdir -p test_ws/src
cd test_ws/src
git clone http://git.51golo.com:10080/lujinji/simple_nav_goals.git
cd $GOLO_WS_PATH/../../test_ws/
source /opt/ros/melodic/setup.bash
catkin_make -DCMAKE_INSTALL_PREFIX=/home/nuc/test_ws/install install
sleep 120
sudo rm -rf /opt/ros/melodic/share/simple_nav_goals
sudo mv  $GOLO_WS_PATH/../../test_ws/install/share/simple_nav_goals /opt/ros/melodic/share/
sudo mv  $GOLO_WS_PATH/../../launch   /opt/ros/melodic/share/simple_nav_goals/
sudo mv  $GOLO_WS_PATH/../..//test_ws/src/simple_nav_goals/inclule /opt/ros/melodic/share/simple_nav_goals/
sudo mv  $GOLO_WS_PATH/../../test_ws/devel/lib/simple_nav_goals /opt/ros/melodic/lib/
sudo rm -rf $GOLO_WS_PATH/../../test_ws
